package com.easycoding.framework.config;

/**
 * <b>Description</b>:<br/>
 
 * <b>Create Date</b>: 2013-4-1 下午2:09:20<br/>
 * <b>Version</b>: Since JDK 1.6.0<br/>
 * <b>Package</b>: com.easycoding.framework.config
 */
public enum AppConfigKey {
	USER_UPLOAD_DIR("app.userUploadDir","用户文件上传目录"),
	/**缩略图文件名后缀*/
	SMALL_IMAGE_FLAG("app.smallImageFlag","缩略图文件名后缀");	
	
	private AppConfigKey(String key,String name){
		this.key = key;
		this.name = name;
	}
	
	private String key;
	private String name;
	
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 获取对应的中文名称  
	 * @param code 枚举值
	 * @return 枚举对应的中文名称
	 */
    public static String getName(String key) {   
        for (AppConfigKey c : AppConfigKey.values()) {   
            if (c.key.equals(key)) {   
                return c.name;   
            }   
        }   
        return null;   
    } 
}
